<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>上传设计稿</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="../css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="../css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="../css/AdminLTE.css" rel="stylesheet" type="text/css" />

        <link href="../css/myself.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" href="../css/reset.css" />
        <link rel="stylesheet" href="../css/pagination.css" />
        <script type="text/javascript" src="../js/lib/jquery.min.js"></script>
        <script type="text/javascript" src="../js/jquery.pagination.js"></script>
        <link type="text/css" href="../css/datepicker/datepicker3.css"/>
        <link href="../css/bootstrap-tagsinput.css" rel="stylesheet" type="text/css" >
        <link href="../css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
        <script type="text/javascript">
	        $(document).ready(function() {
	         	$("#Pagination").pagination("15");
	        });
		</script>
    </head>
    <body class="skin-blue">
        <!-- header logo: style can be found in header.less -->
        <header class="header">
            <a href="../../index.html" class="logo">
                <img src="../img/logo_03.jpg"/>
                后台管理系统
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top" role="navigation">
                <div class="navbar-right">
                    <ul class="nav navbar-nav">
                        <!-- Notifications: style can be found in dropdown.less -->
                        <li class="dropdown notifications-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                               设置
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">You have 10 notifications</li>
                                <li>
                                    <!-- inner menu: contains the actual data -->
                                    <ul class="menu">
                                        <li>
                                            <a href="#">
                                                <i class="ion ion-ios7-people info"></i> 5 new members joined today
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#">
                                                <i class="fa fa-warning danger"></i> Very long description here that may not fit into the page and may cause design problems
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#">
                                                <i class="fa fa-users warning"></i> 5 new members joined
                                            </a>
                                        </li>

                                        <li>
                                            <a href="#">
                                                <i class="ion ion-ios7-cart success"></i> 25 sales made
                                            </a>
                                        </li>
                                        <li>
                                            <a href="#">
                                                <i class="ion ion-ios7-person danger"></i> You changed your username
                                            </a>
                                        </li>
                                    </ul>
                                </li>
                                <li class="footer"><a href="#">View all</a></li>
                            </ul>
                        </li>
                        <!-- Tasks: style can be found in dropdown.less -->
                        <li class="dropdown tasks-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                               姓名
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">You have 9 tasks</li>
                                <li>
                                    <!-- inner menu: contains the actual data -->
                                    <ul class="menu">
                                        <li><!-- Task item -->
                                            <a href="#">
                                                <h3>
                                                    Design some buttons
                                                    <small class="pull-right">20%</small>
                                                </h3>
                                                <div class="progress xs">
                                                    <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                        <span class="sr-only">20% Complete</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li><!-- end task item -->
                                        <li><!-- Task item -->
                                            <a href="#">
                                                <h3>
                                                    Create a nice theme
                                                    <small class="pull-right">40%</small>
                                                </h3>
                                                <div class="progress xs">
                                                    <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                        <span class="sr-only">40% Complete</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li><!-- end task item -->
                                        <li><!-- Task item -->
                                            <a href="#">
                                                <h3>
                                                    Some task I need to do
                                                    <small class="pull-right">60%</small>
                                                </h3>
                                                <div class="progress xs">
                                                    <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                        <span class="sr-only">60% Complete</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li><!-- end task item -->
                                        <li><!-- Task item -->
                                            <a href="#">
                                                <h3>
                                                    Make beautiful transitions
                                                    <small class="pull-right">80%</small>
                                                </h3>
                                                <div class="progress xs">
                                                    <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                        <span class="sr-only">80% Complete</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li><!-- end task item -->
                                    </ul>
                                </li>
                                <li class="footer">
                                    <a href="#">View all tasks</a>
                                </li>
                            </ul>
                        </li>
                        <!-- User Account: style can be found in dropdown.less -->
                        <li class="dropdown user user-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="glyphicon glyphicon-user"></i>
                                <span>Jane Doe <i class="caret"></i></span>
                            </a>
                            <ul class="dropdown-menu">
                                <!-- User image -->
                                <li class="user-header bg-light-blue">
                                    <img src="../../img/avatar3.png" class="img-circle" alt="User Image" />
                                    <p>
                                        Jane Doe - Web Developer
                                        <small>Member since Nov. 2012</small>
                                    </p>
                                </li>
                                <!-- Menu Body -->
                                <li class="user-body">
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Followers</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Sales</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Friends</a>
                                    </div>
                                </li>
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <a href="#" class="btn btn-default btn-flat">Profile</a>
                                    </div>
                                    <div class="pull-right">
                                        <a href="#" class="btn btn-default btn-flat">Sign out</a>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    <ul class="sidebar-menu">
                        <li>
                            <a href="../../index.html">
                                <i class="iconfont">&#xe6e0;</i> <span>工作台</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        <li class="active">
                            <a  <a href="../html/pages/Design_order.html">
                                <i class="iconfont">&#xe6e1;</i><span>设计订单</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="iconfont">&#xe6e6;</i>
                                <span>打样订单</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="iconfont">&#xe6e2;</i>
                                <span>大货订单</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="iconfont">&#xe6e8;</i> <span>历史订单</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="iconfont">&#xe6e3;</i> <span>客户管理</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        <li>
                            <a href="../calendar.html">
                                <i class="iconfont">&#xe6e4;</i> <span>工厂管理</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        <li>
                            <a href="../mailbox.html">
                                <i class="iconfont">&#xe6e7;</i> <span>设计库</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="iconfont">&#xe6e5;</i> <span>面料库</span>
                                <i class="fa fa-angle-right pull-right"></i>
                            </a>
                        </li>
                    </ul>
                </section>
                <!-- /.sidebar -->
            </aside>

            <!-- Right side column. Contains the navbar and content of the page -->
           <aside class="right-side">
           	<section class="content-header">
                    <h1 >上传设计稿
                    	<!--<small><a href="#">返回</a></small>-->
                    </h1>
                    
                    <div class="clear"></div>
                    <ol class="ol_left">
                        <li><a href="#">设计订单</a></li>
                        <li><a href="#">> 设计订单详情</a></li>
                        <li>> 上传设计稿</li>
                    </ol>
                    
            </section>
            <section class="content">
            	<div class="row">
            		<div class="col-md-12">
                        <div class="box">
                            <div class="clearfix conter">
                                <span class="pull-left four-font">款式图</span>
                                <div class="col-md-12 photo">
                                    <div class="col-md-4 col-md-offset-4  text-center">
                                        <span class="btn btn-primary shangchuan"><input type="file" name="" id="file_upload">点击上传款式图</span>
                                        <span>
                                            <p>建议尺寸：480*270px</p>
                                            <p>仅支持jpg、png、bmp格式</p>
                                        </span>
                                    </div>
                                    <div class="zhanshi" >
                                        <!-- <img id="preview" /> -->
                                        <div class="zhanshi_find1">
                                            <div class="col-md-8 ">
                                                <img id="zhanshi_photo" src="../images/Design_draft_03.jpg">
                                            </div>
                                            <div class="col-md-4">
                                                <span class="span_active">
                                                    <img src="../images/Design_draft_03.jpg">
                                                    <p style="display: block;">默认主图</p>
                                                </span>
                                                <!-- <span >
                                                    <img src="../img/avatar.png">
                                                    <p>默认主图</p>
                                                </span>
                                                <span >
                                                    <img src="../img/avatar2.png">
                                                    <p>默认主图</p>
                                                </span>
                                                <span >
                                                    <img src="../images/Design_draft_03.jpg">
                                                    <p>默认主图</p>
                                                </span>
                                                <span >
                                                    <img src="../images/Design_draft_03.jpg">
                                                    <p>默认主图</p>
                                                </span> -->
                                                <a class="tianjia">
                                                    <img src="../img/tianjia.png">
                                                    <input type="file" name="" id="file_upload2">
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                            </div>
                            <div class=" custorm-view clearfix ">
                                 <span class="content-title-left four-font pull-left">设计信息</span>
                            </div>
                            <div class="center">
                                        <div class="style-chart clearfix">
                                                <div class=" find-row">
                                                    <div class=" find-col" style="width: auto;">
                                                        <label>
                                                            <span>款号</span>
                                                            <input type="text" />
                                                        </label>
                                                        <label>
                                                            <span>年份</span>
                                                            <select class="">
                                                                <option>2011</option>
                                                                <option>2012</option> 
                                                                <option>2013</option>
                                                                <option>2014</option> 
                                                            </select>
                                                        </label>
                                                        <label>
                                                            <span>季节</span>
                                                            <select class="">
                                                                <option>春</option>
                                                                <option>夏</option> 
                                                                <option>秋</option>
                                                                <option>冬</option> 
                                                            </select>
                                                        </label>
                                                        
                                                        
                                                    </div>
                                                    <div class=" find-col" style="width: auto;">
                                                            <span class="find_sp">风格</span>
                                                            <div class="find_div bs-example">
                                                                <input type="text" value="" data-role="tagsinput" />
                                                            </div>
                                                    </div>
                                            </div>
                                        </div>
                            </div>
                            <div class=" custorm-view clearfix">
                                <span class="content-title-left four-font pull-left">款式细节明细</span>
                            </div>
                            <div class='box-body pad marign-top'>
                                    <form>
                                        <textarea id="editor1" name="editor1" rows="10" cols="80">
                                            
                                            <table border="1" cellpadding="1" cellspacing="1" style="height:155px; width:600px;text-align: center;">
                                                <tbody>
                                                    <tr>
                                                        <td style="text-align: center;">细节</td>
                                                        <td style="text-align: center;">描述</td>
                                                        <td style="text-align: center;">尺寸大小</td>
                                                    </tr>
                                                    <tr>
                                                        <td style="text-align: center;">扣子</td>
                                                        <td style="text-align: center;">用金属/树枝</td>
                                                        <td style="text-align: center;">2.8cm</td>
                                                    </tr>
                                                    <tr>
                                                        <td style="text-align: center;">下裙罗摆</td>
                                                        <td style="text-align: center;">针数参考图片</td>
                                                        <td style="text-align: center;">高7cm</td>
                                                    </tr>
                                                </tbody>
                                            </table>

                                            <p><br />



                                        </textarea>
                                    </form>
                            </div>
                            <div class=" custorm-view clearfix">
                                         <span class="content-title-left four-font pull-left">面辅料明细</span>
                                    </div>
                                <div class='box-body pad marign-top'>
                                    <form>
                                        <textarea id="editor2" name="editor1" rows="10" cols="80">
                                            This is my textarea to be replaced with CKEditor.
                                        </textarea>
                                    </form>
                             </div>
                             <div class="padding">
                                    <button type="button" class="btn btn-primary btn-flat">确定上传</button>
                                    <button type="button" class="btn btn-bule btn-flat">取消上传</button>
                            </div> 
                            <div class="box-footer clearfix">
				                    <ul class="pagination pagination-sm no-margin pull-right">
				                        <li><a href="#">首页</a></li>
				                        <li><a href="#">上一页</a></li>
				                        <li>
				                        	<a href="javascript:;" style="padding: 0;">
				                        		<input type="text"  style="border: none; border-bottom: 1px solid #ccc; padding: 4.5px 0; width: 40px;"/>
				                        	</a>
				                        </li>
				                        <li><a href="#">下一页</a></li>
				                        <li><a href="#">尾页</a></li>
				                    </ul>
				                </div>
                        </div>
            		</div>
            	</div>
            </section>
            </aside><!-- /.right-side -->

        </div><!-- ./wrapper -->
        <!-- jQuery 2.0.2 -->
        <style type="text/css">
	        .custorm-view{
	                border: none;
	            }
	        .clear{
	            clear: both;
	            width: 100%;
	            height: 1px;
	
	        }
	        .find_sp{
	            margin-bottom: 10px;
	            padding: 0 10px;
	            display: inline-block;
	            font-weight: bold;
	            float: left;
	            padding-right: 5px;
	        }
	        .find_div{
	            width: 90%;
	            height: 90px;
	            border:1px solid #ccc;
	            float: left;
	        }
	        .six-font{
	            font-size: 14px;
	        }
	        .six-font>span{
	            font-size: 16px;
	        }
	     
	        .pull-left {
	            border-left: 6px solid #3882FF;
	            padding: 0 5px;
	        }
	        .photo{
	            height: 348px;
	            max-height: 348px;
	            border:1px solid #ccc;
	            margin-top: 20px;
	            margin-bottom: 20px;
	            padding: 0;
	        }
	        .shangchuan{
	            margin-top: 100px;
	            position: relative;
	            cursor: pointer;
	            background: #fafafa;
	            border: 1px solid #ddd;
	            border-radius: 4px;
	            overflow: hidden;
	            display: inline-block;
	            *display: inline;
	            *zoom: 1;
	        }
	        .shangchuan  input {
	            position: absolute;
	            font-size: 100px;
	            right: 0;
	            top: 0;
	            opacity: 0;
	            filter: alpha(opacity=0);
	            cursor: pointer
	        }
	        .zhanshi{
	            width: 100%;
	            height: 100%;
	            position: absolute;
	            top: 0;
	            display: none;
	            background-color: #fff;
	
	        }
	        .zhanshi_find1{
	            widows: 96%;
	            height: 96%;
	            margin: 1% 2%;
	        }
	        .zhanshi_find1>.col-md-8{
	            border:1px solid #ccc;
	            height: 100%;
	            padding: 0;
	        }
	        .zhanshi img{
	            width: 100%;
	            height: 100%;
	            border-width: 0;
	        }
	        .zhanshi_find1>.col-md-4{padding: 0;}
	        .zhanshi_find1>.col-md-4>span{
	            width: 20%;
	            height: 60px;
	            display: inline-block;
	            float: left;
	            border:1px solid #ccc;
	            cursor: pointer;
	            margin:0 0 10px  10px;
	            position: relative;
	        }
	        .span_active{
	            border:2px solid #3882FF !important;
	            box-shadow: 0 0 3px #3882ff;
	        }
	        .zhanshi_find1>.col-md-4>span>p{
	            position: absolute;
	            width: 100%;
	            text-align: center;
	            height: 20px;
	            line-height: 20px;
	            bottom: 0;
	            font-size: 10px;
	            background-color: #4f8aee;
	            color: #fff;
	            display: none;
	        }
	        .tianjia{
	            display: inline-block;
	            width: 20%;
	            height: 60px;
	            display: inline-block;
	            float: left;
	            border:1px solid #ccc;
	            cursor: pointer;
	            margin:0 0 10px  10px;
	            position: relative;
	        }
	        .tianjia  input {
	            position: absolute;
	            font-size: 100px;
	            right: 0;
	            top: 0;
	            opacity: 0;
	            filter: alpha(opacity=0);
	            cursor: pointer;
	            width:100%;
	            height: 100%;
	        }
	        .shejixinxi{
	            border:1px solid #ccc;
	        }
	       	.bootstrap-tagsinput{
	        	border:none;
	       	}
	       	.bootstrap-tagsinput .tag{
		        margin-right: 2px;
		        color: #3882ff;
		        border: 1px solid;
		        border-radius: 0;
	       	}
	       	.label-info{
	        	background-color: #fff;
	       	}
       		/*新增样式*/
    		.ol_left{
	            width: 100%;
	            height: 30px;
	            line-height: 30px;
	            padding: 0;
	        }
	        .ol_left>li{
	            float: left;
	            margin-right: 5px;
	        }
	        .ol_left li, .ol_left{
	        	margin-bottom: 0;
	        }
        </style>
        <script src="../js/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="../js/bootstrap.min.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="../js/AdminLTE/app.js" type="text/javascript"></script>
        <!-- AdminLTE for demo purposes -->
        <script src="../js/AdminLTE/demo.js" type="text/javascript"></script>   

        <script src="../js/plugins/datepicker/bootstrap-datepicker.js"></script>

        <script src="../js/bootstrap-tagsinput.js"></script>

         <script src="../js/plugins/ckeditor/ckeditor.js" type="text/javascript"></script>
        <!-- Bootstrap WYSIHTML5 -->
        <script src="../js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>
        
        <script type="text/javascript">
            $(function () {
                 $(function() {
                    // Replace the <textarea id="editor1"> with a CKEditor
                    // instance, using default configuration.
                    CKEDITOR.replace('editor1');
                    //bootstrap WYSIHTML5 - text editor
                    $(".textarea").wysihtml5();
                });
                $(function() {
                    // Replace the <textarea id="editor1"> with a CKEditor
                    // instance, using default configuration.
                    CKEDITOR.replace('editor2');
                    //bootstrap WYSIHTML5 - text editor
                    $(".textarea").wysihtml5();
                });




                $("#file_upload").change(function () {
                    $('.zhanshi').show();

                    var $file = $(this);
                    var fileObj = $file[0];
                    var windowURL = window.URL || window.webkitURL;
                    var dataURL;
                    var $img = $("#zhanshi_photo");

                    if (fileObj && fileObj.files && fileObj.files[0]) {
                        dataURL = windowURL.createObjectURL(fileObj.files[0]);
                        $img.attr('src', dataURL);
                    } else {
                        dataURL = $file.val();
                        var imgObj = document.getElementById("zhanshi_photo");
                        // 两个坑:
                        // 1、在设置filter属性时，元素必须已经存在在DOM树中，动态创建的Node，也需要在设置属性前加入到DOM中，先设置属性在加入，无效；
                        // 2、src属性需要像下面的方式添加，上面的两种方式添加，无效；
                        imgObj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)";
                        imgObj.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = dataURL;

                    }
                     
                     $('.span_active img').attr('src',dataURL);
                });

                $('#file_upload2').change(function(){
                   
                   var $file = $(this);
                    var fileObj = $file[0];
                    var windowURL = window.URL || window.webkitURL;
                    var dataURL;
                    var $img = $("#zhanshi_photo");

                    if (fileObj && fileObj.files && fileObj.files[0]) {
                        dataURL = windowURL.createObjectURL(fileObj.files[0]);
                        // $img.attr('src', dataURL);
                    } else {
                        dataURL = $file.val();
                        var imgObj = document.getElementById("zhanshi_photo");
                        // 两个坑:
                        // 1、在设置filter属性时，元素必须已经存在在DOM树中，动态创建的Node，也需要在设置属性前加入到DOM中，先设置属性在加入，无效；
                        // 2、src属性需要像下面的方式添加，上面的两种方式添加，无效；
                        // imgObj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)";
                        // imgObj.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = dataURL;

                    }
                     var a='<span >'+'<img src="'+dataURL+'">'+'  <p >默认主图</p>'+' </span> ';
                     // '+dataURL+'

                    $('.tianjia').before(a);

                    $('.zhanshi_find1 .col-md-4 span').click(function(){
                        $(this).addClass('span_active');
                        $(this).siblings('span').removeClass('span_active');
                        $(this).find("p").show();
                        $(this).siblings('span').find("p").hide();
                        var src=$(this).find('img').attr('src');
                        $("#zhanshi_photo").attr("src",src);

                    })


                });
                 $('.zhanshi_find1 .col-md-4 span').click(function(){
                        $(this).addClass('span_active');
                        $(this).siblings('span').removeClass('span_active');
                        $(this).find("p").show();
                        $(this).siblings('span').find("p").hide();
                        var src=$(this).find('img').attr('src');
                        $("#zhanshi_photo").attr("src",src);

                    })



                



        });
            
        </script>
        
    </body>
</html>
